<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<script type="text/javascript" src="/admin/js-css/js/jquery-1.7.2.min.js"></script>
		<script type="text/javascript" src="/admin/js-css/js/jquery.ztree-2.6.min.js" ></script>
		<script type="text/javascript" src="/admin/js-css/js/tree.js" ></script>
		<script type="text/javascript" src="/admin/js-css/js/mx1.0.js"></script>
		<script type="text/javascript" src="/admin/js-css/js/mx1.0.1.js"></script>
		<link rel="stylesheet" href="/admin/plugin/zTreeStyle/zTreeStyle-menus.css?v=1.3" />

	</head>
	<body>
		<div id="tree" class="tree"></div>

		<SCRIPT LANGUAGE="JavaScript">
		function zTreeOnAsyncSuccess(event, treeId, msg){
			zTree.openLevel();

		}
		function showIconForTree(treeId, treeNode) {
   			return !treeNode.isParent;
		};
		//onload
		var	zTree;
		$(document).ready(function(){
			console.log("11234444");
			 // Tree
			var setting = {
				checkable: false,
				callback : {
     				click: zTreeOnClick,
     				asyncSuccess: zTreeOnAsyncSuccess
  				 },
  			//默认打开几层节点
  			openLevel:2,
			async: true,
			asyncUrl: "/admin/api/DataManagementController/queryDataMangerChildNodeData_jurisdiction",  //获取节点数据的URL地址
			asyncParam: ["name", "id","type","tableId"],  //获取节点数据时，必须的数据名称，例如：id、name
			asyncParamOther: ["token",localStorage.getItem("token")] //其它参数 ( key, value 键值对格式)

			};
			var zNodes =[];
			zTree = $("#tree").zTree(setting, zNodes);
			zTree.expandAll(true);


			window.setTimeout(function (){
				document.documentElement.scrollTop = 0;
			},1000);
		});



		function zTreeOnClick(event,treeId,treeNode){
			top.data.param = {ids:""};
			//alert(treeNode.id + ", " + treeNode.name+ ", "+treeNode.code);
			top.data.zygl_id = treeNode.tableId;
			top.data.tableId = treeNode.tableId;
			top.data.orderCol = treeNode.order_col;
			top.data.inputurl = treeNode.inputurl;
			top.data.treeObj = treeNode;
			top.data.treeNodeObj = {tableId:treeNode.tableId,id:treeNode.id,type:treeNode.type,inputurl:treeNode.inputurl,orderCol:treeNode.order_col};
			let openurl = "/admin/html/dataManagement/list.html?v="+new Date();
			if(treeNode.list_url != ""){
				openurl = treeNode.list_url;
			}
			parent.rightOpen({id:"lanmuguanli"+treeNode.id,url:openurl,name:treeNode.name});
		}



  </SCRIPT>


	</body>
</html>
